package priv.pattern.statemodel.example2;

import org.junit.Test;
import priv.pattern.statemodel.example2.service.impl.OffDuty;
import priv.pattern.statemodel.example2.service.impl.ToGoToTheOffice;

/*
 * 作者：m鹏h
 * 时间；2024/8/11 0:23
 * 描述：状态模式  客户端 （实例二）
 **/

public class StateModelTest {
 @Test
 public void  test1(){
  ConText conText = new ConText();
  System.out.println("下班的状态");
  conText.setState(new OffDuty());
  System.out.println("------------------------------------");
  System.out.println("上班状态");
  conText.setState(new ToGoToTheOffice());
 }
}
